<template>
  <div class="login-page">
    <h1 style="color: black; font-weight: bold">Heat Engineering Risk Information System</h1>
    <button @click="redirectToHome">Login</button>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()

const redirectToHome = () => {
  router.push('/home')
}
</script>

<style scoped>
.login-page {
  /* 设置背景图片 */

  /* 背景图片自适应容器大小而不拉伸 */
  background-size: contain;

  /* 使用 Flexbox 布局 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  /* 至少占据视口的高度 */
  min-height: 100vh;
  width: 100%;
}

/* 样式调整 */
h1 {
  margin-bottom: 20px;
}

button {
  padding: 10px 20px;
  font-size: 16px;
  color: white;
  background-color: #007bff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}
</style>
